const http=require('http');
const querystring=require('querystring');
http.createServer(function(req,res){
    if(req.url.indexOf('?')!=-1){
        const arr=req.url.split('?')[1];
        let getData=querystring.parse(arr)
        console.log(getData); //{ user: '1', pass: '1' }
    }
    res.write('aa');
    res.end();
}).listen(8080)